﻿// Copyright (c) Inossem. All rights reserved.
// Licensed under the LGPL-3.0 license. See LICENSE file in the project root for full license information.
using DWF.Studio.Plugin.Contract;
using DWF.Studio.Plugin.Contract.Exceptions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DWF.Studio.Plugin.Loader.Event
{
    /// <summary>
    /// 插件卸载事件
    /// </summary>
    [Serializable]
    public class PluginUnloadedEventArgs : EventArgs
    {
        public PluginUnloadedEventArgs(PluginInfo info, PluginParameters results)
            : base()
        {
            this.Info = info;
            if (results == null)
                this.Results = new PluginParameters();
            else
                this.Results = results;
        }

        public PluginInfo Info
        {
            get;
            private set;
        }

        public PluginParameters Results
        {
            get;
            private set;
        }

        public bool ExecutionCancelled
        {
            get;
            private set;
        }

        public object ExecutionCancelledReason
        {
            get;
            private set;
        }

        public PluginException PluginException
        {
            get; private set;
        }
    }
}
